package com.love.cloud.admin.notify.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.love.cloud.admin.notify.dto.NotifyReplyChildDto;
import com.love.cloud.admin.notify.entity.NotifyReply;
import com.love.cloud.admin.notify.vo.ReplyVo;
import com.love.cloud.common.mybatis.mapper.MyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author hongdongqu
 */
@Mapper
public interface NotifyReplyMapper extends MyBaseMapper<NotifyReply> {

    /**
     * 获取到分页列表
     * @param articleId
     * @param replyVo
     * @return
     */
    IPage<NotifyReply> replyPageInfo(Page page, @Param("articleId") Long articleId, @Param("replyVo") ReplyVo replyVo);
    /**
     * 获取到回复列表
     * @param articleId
     * @param replyVo
     * @return
     */
    List<NotifyReply> getReplyList(@Param("articleId") Long articleId, @Param("replyVo") ReplyVo replyVo);

    /**
     * 获取到子回复
     * @param storeyNum
     * @return
     */
    List<NotifyReplyChildDto> getReplyChildList(Integer storeyNum);

    /**
     * 保存回复
     * @param notifyReply
     * @return
     */
    int saveReply(NotifyReply notifyReply);

    /**
     * 更新回复
     * @param notifyReply
     * @return
     */
    int updateReplyNum(NotifyReply notifyReply);
}
